#pragma once

#include "ISystem.h"
#include "Modules.h"
#include "FadingText.h"


class CMouse;
class CKeyboard;
class CActionManager;

class CInput: public IInput, public IInputListener
{
public:
	CInput();
	~CInput();

	//	IInput
	virtual bool Init();
	virtual void Update();

	virtual void RegisterListener(IInputListener* listener);
	virtual void UnregisterListener(IInputListener* listener);

	virtual void DispatchMessage(uint msg, WPARAM wParam, LPARAM lParam);

	virtual IMouse*					GetMouse();
	virtual IKeyboard*			GetKeyboard();
	virtual IActionManager*	GetActionManager();
	//	---

	virtual void OnInputEvent(const SInputEvent& input_event);

private:
	std::unique_ptr<CMouse>					m_mouse;
	std::unique_ptr<CKeyboard>			m_keyboard;
	std::unique_ptr<CActionManager> m_action_manager;

	CFadingText	m_text;
};

REGISTER_GAME_MODULE(IInput, CInput)